﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;

namespace Agile.Engine.Utils
{
    public class NetUtils
    {
        public static bool PingSuccess()
        {
            Ping ping = new Ping();
            PingReply reply;
            try
            {
                reply = ping.Send("www.baidu.com");
                if (reply.Status == System.Net.NetworkInformation.IPStatus.Success)
                {
                    return true;
                }
            }
            catch
            {
            }
            return false;
        }
    }
}
